package models.enums;

/**
 * Created by youliangcheng on 17/12/5.
 * 客户分类
 * 正常用户 , 内部用户 , 关门搬迁客户,其他用户
 */
public enum UserClassify {

    NORMAL // 正常用户
    ,EMPLOYEE // 内部员工
    ,CLOSEDSHOP // 关门搬迁客户
    ,OTHER; // 其他类型客户

    public static String getUserClassifyStr(UserClassify userClassify){
        String userClassifyStr = "" ;
        if(userClassify == null)
            return  userClassifyStr ;

        switch (userClassify){
            case NORMAL : userClassifyStr = "正常客户"; break;
            case EMPLOYEE : userClassifyStr = "内部员工"; break;
            case CLOSEDSHOP : userClassifyStr = "关门搬迁客户"; break;
            case OTHER : userClassifyStr = "其他"; break;
            default: userClassifyStr = "" ;break;
        }

        return userClassifyStr ;
    }

    public static UserClassify getUserClassify(String userClassifyStr){
        UserClassify UserClassify = null ;
        if(userClassifyStr.equals(UserClassify.NORMAL.toString()))
            UserClassify = UserClassify.NORMAL;
        if(userClassifyStr.equals(UserClassify.EMPLOYEE.toString()))
            UserClassify = UserClassify.EMPLOYEE;
        if(userClassifyStr.equals(UserClassify.CLOSEDSHOP.toString()))
            UserClassify = UserClassify.CLOSEDSHOP;
        if(userClassifyStr.equals(UserClassify.OTHER.toString()))
            UserClassify = UserClassify.OTHER;

        return UserClassify ;
    }

}
